﻿CREATE PROCEDURE [dbo].[proc_Project_GetlistCount]
	(
		@CompanyId int,
		@StartDate nvarchar(10),
		@EndDate nvarchar(10),
		@Audit int,
		@Stext nvarchar(50)
	)
AS
	Select Count(Id),Sum(ISNULL(CostPrice,0)) From Project
	Where (@CompanyId=0 Or CompanyId=@CompanyId) and Convert(nchar(10),CreateDate,120) between @StartDate and @EndDate
		and (@Audit=0 Or FinanceAudit=@Audit)
		and (@Stext='' Or CusName like '%'+@Stext+'%')
	RETURN
